package com.cloud.controller;

import com.cloud.product.output.SimpleOutPut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: TongRui乀
 * @Date: 2019/10/18 16:11
 * @description：
 */
@RestController
public class WebController {

    @Autowired
    private SimpleOutPut simpleOutput;

    @GetMapping("service")
    public String hi(){
        return "i am service 01";
    }


    @GetMapping("send")
    public void send(String message){
        this.simpleOutput.send().send(MessageBuilder.withPayload(message).build());
    }
}
